Integrand size = 34, antiderivative size = 102 \[ \int \frac {\tan ^4(c+d x) (a B+b B \tan (c+d x))}{(a+b \tan (c+d x))^2} \, dx=\frac {a B x}{a^2+b^2}+\frac {b B \log (\cos (c+d x))}{\left (a^2+b^2\right ) d}+\frac {a^4 B \log (a+b \tan (c+d x))}{b^3 \left (a^2+b^2\right ) d}-\frac {a B \tan (c+d x)}{b^2 d}+\frac {B \tan ^2(c+d x)}{2 b d} \]
a*B*x/(a^2+b^2)+b*B*ln(cos(d*x+c))/(a^2+b^2)/d+a^4*B*ln(a+b*tan(d*x+c))/b^ 3/(a^2+b^2)/d-a*B*tan(d*x+c)/b^2/d+1/2*B*tan(d*x+c)^2/b/d
Result contains complex when optimal does not.
Time = 0.39 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.06 \[ \int \frac {\tan ^4(c+d x) (a B+b B \tan (c+d x))}{(a+b \tan (c+d x))^2} \, dx=\frac {B \left (\frac {\log (i-\tan (c+d x))}{i a-b}-\frac {\log (i+\tan (c+d x))}{i a+b}+\frac {2 a^4 \log (a+b \tan (c+d x))}{b^3 \left (a^2+b^2\right )}-\frac {2 a \tan (c+d x)}{b^2}+\frac {\tan ^2(c+d x)}{b}\right )}{2 d} \]
(B*(Log[I - Tan[c + d*x]]/(I*a - b) - Log[I + Tan[c + d*x]]/(I*a + b) + (2 *a^4*Log[a + b*Tan[c + d*x]])/(b^3*(a^2 + b^2)) - (2*a*Tan[c + d*x])/b^2 + Tan[c + d*x]^2/b))/(2*d)
Time = 0.75 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.13, number of steps used = 14, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.382, Rules used = {2011, 3042, 4049, 27, 3042, 4130, 25, 3042, 4110, 3042, 3956, 4100, 16}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\tan ^4(c+d x) (a B+b B \tan (c+d x))}{(a+b \tan (c+d x))^2} \, dx\) |
\(\Big \downarrow \) 2011 |
\(\displaystyle B \int \frac {\tan ^4(c+d x)}{a+b \tan (c+d x)}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle B \int \frac {\tan (c+d x)^4}{a+b \tan (c+d x)}dx\) |
\(\Big \downarrow \) 4049 |
\(\displaystyle B \left (\frac {\int -\frac {2 \tan (c+d x) \left (a \tan ^2(c+d x)+b \tan (c+d x)+a\right )}{a+b \tan (c+d x)}dx}{2 b}+\frac {\tan ^2(c+d x)}{2 b d}\right )\) |
\(\Big \downarrow \) 27 |
\(\displaystyle B \left (\frac {\tan ^2(c+d x)}{2 b d}-\frac {\int \frac {\tan (c+d x) \left (a \tan ^2(c+d x)+b \tan (c+d x)+a\right )}{a+b \tan (c+d x)}dx}{b}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle B \left (\frac {\tan ^2(c+d x)}{2 b d}-\frac {\int \frac {\tan (c+d x) \left (a \tan (c+d x)^2+b \tan (c+d x)+a\right )}{a+b \tan (c+d x)}dx}{b}\right )\) |
\(\Big \downarrow \) 4130 |
\(\displaystyle B \left (\frac {\tan ^2(c+d x)}{2 b d}-\frac {\frac {\int -\frac {a^2+\left (a^2-b^2\right ) \tan ^2(c+d x)}{a+b \tan (c+d x)}dx}{b}+\frac {a \tan (c+d x)}{b d}}{b}\right )\) |
\(\Big \downarrow \) 25 |
\(\displaystyle B \left (\frac {\tan ^2(c+d x)}{2 b d}-\frac {\frac {a \tan (c+d x)}{b d}-\frac {\int \frac {a^2+\left (a^2-b^2\right ) \tan ^2(c+d x)}{a+b \tan (c+d x)}dx}{b}}{b}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle B \left (\frac {\tan ^2(c+d x)}{2 b d}-\frac {\frac {a \tan (c+d x)}{b d}-\frac {\int \frac {a^2+\left (a^2-b^2\right ) \tan (c+d x)^2}{a+b \tan (c+d x)}dx}{b}}{b}\right )\) |
\(\Big \downarrow \) 4110 |
\(\displaystyle B \left (\frac {\tan ^2(c+d x)}{2 b d}-\frac {\frac {a \tan (c+d x)}{b d}-\frac {-\frac {b^3 \int \tan (c+d x)dx}{a^2+b^2}+\frac {a^4 \int \frac {\tan ^2(c+d x)+1}{a+b \tan (c+d x)}dx}{a^2+b^2}+\frac {a b^2 x}{a^2+b^2}}{b}}{b}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle B \left (\frac {\tan ^2(c+d x)}{2 b d}-\frac {\frac {a \tan (c+d x)}{b d}-\frac {-\frac {b^3 \int \tan (c+d x)dx}{a^2+b^2}+\frac {a^4 \int \frac {\tan (c+d x)^2+1}{a+b \tan (c+d x)}dx}{a^2+b^2}+\frac {a b^2 x}{a^2+b^2}}{b}}{b}\right )\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle B \left (\frac {\tan ^2(c+d x)}{2 b d}-\frac {\frac {a \tan (c+d x)}{b d}-\frac {\frac {a^4 \int \frac {\tan (c+d x)^2+1}{a+b \tan (c+d x)}dx}{a^2+b^2}+\frac {a b^2 x}{a^2+b^2}+\frac {b^3 \log (\cos (c+d x))}{d \left (a^2+b^2\right )}}{b}}{b}\right )\) |
\(\Big \downarrow \) 4100 |
\(\displaystyle B \left (\frac {\tan ^2(c+d x)}{2 b d}-\frac {\frac {a \tan (c+d x)}{b d}-\frac {\frac {a^4 \int \frac {1}{a+b \tan (c+d x)}d(b \tan (c+d x))}{b d \left (a^2+b^2\right )}+\frac {a b^2 x}{a^2+b^2}+\frac {b^3 \log (\cos (c+d x))}{d \left (a^2+b^2\right )}}{b}}{b}\right )\) |
\(\Big \downarrow \) 16 |
\(\displaystyle B \left (\frac {\tan ^2(c+d x)}{2 b d}-\frac {\frac {a \tan (c+d x)}{b d}-\frac {\frac {a b^2 x}{a^2+b^2}+\frac {b^3 \log (\cos (c+d x))}{d \left (a^2+b^2\right )}+\frac {a^4 \log (a+b \tan (c+d x))}{b d \left (a^2+b^2\right )}}{b}}{b}\right )\) |
B*(Tan[c + d*x]^2/(2*b*d) - (-(((a*b^2*x)/(a^2 + b^2) + (b^3*Log[Cos[c + d *x]])/((a^2 + b^2)*d) + (a^4*Log[a + b*Tan[c + d*x]])/(b*(a^2 + b^2)*d))/b ) + (a*Tan[c + d*x])/(b*d))/b)
3.4.6.3.1 Defintions of rubi rules used
Int[(c_.)/((a_.) + (b_.)*(x_)), x_Symbol] :> Simp[c*(Log[RemoveContent[a + b*x, x]]/b), x] /; FreeQ[{a, b, c}, x]
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Simp[(b/d)^m Int[u*(c + d*v)^(m + n), x], x] /; FreeQ[{a, b, c, d, n}, x ] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c + d*x , a + b*x])
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d *x], x]]/d, x] /; FreeQ[{c, d}, x]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[b^2*(a + b*Tan[e + f*x])^(m - 2)*((c + d*Tan[e + f*x])^(n + 1)/(d*f*(m + n - 1))), x] + Simp[1/(d*(m + n - 1)) Int[(a + b*Tan[e + f*x])^(m - 3)*(c + d*Tan[e + f*x])^n*Simp[a^3*d*(m + n - 1) - b^2*(b*c*(m - 2) + a*d*(1 + n)) + b*d*(m + n - 1)*(3*a^2 - b^2)*Tan[ e + f*x] - b^2*(b*c*(m - 2) - a*d*(3*m + 2*n - 4))*Tan[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2 , 0] && NeQ[c^2 + d^2, 0] && IntegerQ[2*m] && GtQ[m, 2] && (GeQ[n, -1] || I ntegerQ[m]) && !(IGtQ[n, 2] && ( !IntegerQ[m] || (EqQ[c, 0] && NeQ[a, 0])) )
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_) + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[A/(b*f) Subst[Int[(a + x)^m, x], x, b* Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, A, C, m}, x] && EqQ[A, C]
Int[((A_) + (C_.)*tan[(e_.) + (f_.)*(x_)]^2)/((a_) + (b_.)*tan[(e_.) + (f_. )*(x_)]), x_Symbol] :> Simp[a*(A - C)*(x/(a^2 + b^2)), x] + (Simp[(a^2*C + A*b^2)/(a^2 + b^2) Int[(1 + Tan[e + f*x]^2)/(a + b*Tan[e + f*x]), x], x] - Simp[b*((A - C)/(a^2 + b^2)) Int[Tan[e + f*x], x], x]) /; FreeQ[{a, b, e, f, A, C}, x] && NeQ[a^2*C + A*b^2, 0] && NeQ[a^2 + b^2, 0] && NeQ[A, C]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_. ) + (f_.)*(x_)]^2), x_Symbol] :> Simp[C*(a + b*Tan[e + f*x])^m*((c + d*Tan[ e + f*x])^(n + 1)/(d*f*(m + n + 1))), x] + Simp[1/(d*(m + n + 1)) Int[(a + b*Tan[e + f*x])^(m - 1)*(c + d*Tan[e + f*x])^n*Simp[a*A*d*(m + n + 1) - C *(b*c*m + a*d*(n + 1)) + d*(A*b + a*B - b*C)*(m + n + 1)*Tan[e + f*x] - (C* m*(b*c - a*d) - b*B*d*(m + n + 1))*Tan[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && GtQ[m, 0] && !(IGtQ[n, 0] && ( !IntegerQ[m] || (EqQ[ c, 0] && NeQ[a, 0])))
Time = 0.10 (sec) , antiderivative size = 93, normalized size of antiderivative = 0.91
method | result | size |
derivativedivides | \(\frac {B \left (-\frac {-\frac {b \left (\tan ^{2}\left (d x +c \right )\right )}{2}+a \tan \left (d x +c \right )}{b^{2}}+\frac {-\frac {b \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}+a \arctan \left (\tan \left (d x +c \right )\right )}{a^{2}+b^{2}}+\frac {a^{4} \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{3} \left (a^{2}+b^{2}\right )}\right )}{d}\) | \(93\) |
default | \(\frac {B \left (-\frac {-\frac {b \left (\tan ^{2}\left (d x +c \right )\right )}{2}+a \tan \left (d x +c \right )}{b^{2}}+\frac {-\frac {b \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}+a \arctan \left (\tan \left (d x +c \right )\right )}{a^{2}+b^{2}}+\frac {a^{4} \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{3} \left (a^{2}+b^{2}\right )}\right )}{d}\) | \(93\) |
parallelrisch | \(-\frac {-2 B a \,b^{3} d x -B \,a^{2} b^{2} \left (\tan ^{2}\left (d x +c \right )\right )-B \,b^{4} \left (\tan ^{2}\left (d x +c \right )\right )+B \ln \left (1+\tan ^{2}\left (d x +c \right )\right ) b^{4}-2 B \ln \left (a +b \tan \left (d x +c \right )\right ) a^{4}+2 B \,a^{3} b \tan \left (d x +c \right )+2 B a \,b^{3} \tan \left (d x +c \right )}{2 b^{3} d \left (a^{2}+b^{2}\right )}\) | \(118\) |
norman | \(\frac {\frac {B \,a^{2} x}{a^{2}+b^{2}}+\frac {B \,a^{3}}{d \,b^{3}}+\frac {b B a x \tan \left (d x +c \right )}{a^{2}+b^{2}}+\frac {B \left (\tan ^{3}\left (d x +c \right )\right )}{2 d}-\frac {B a \left (\tan ^{2}\left (d x +c \right )\right )}{2 b d}}{a +b \tan \left (d x +c \right )}+\frac {a^{4} B \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{3} \left (a^{2}+b^{2}\right ) d}-\frac {B b \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2 d \left (a^{2}+b^{2}\right )}\) | \(152\) |
risch | \(-\frac {x B}{i b -a}+\frac {2 i B \,a^{2} x}{b^{3}}+\frac {2 i B \,a^{2} c}{b^{3} d}-\frac {2 i B x}{b}-\frac {2 i B c}{b d}-\frac {2 i a^{4} B x}{b^{3} \left (a^{2}+b^{2}\right )}-\frac {2 i a^{4} B c}{b^{3} d \left (a^{2}+b^{2}\right )}+\frac {2 B \left (-i a \,{\mathrm e}^{2 i \left (d x +c \right )}+b \,{\mathrm e}^{2 i \left (d x +c \right )}-i a \right )}{b^{2} d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) B \,a^{2}}{b^{3} d}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) B}{b d}+\frac {a^{4} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right ) B}{b^{3} d \left (a^{2}+b^{2}\right )}\) | \(247\) |
1/d*B*(-1/b^2*(-1/2*b*tan(d*x+c)^2+a*tan(d*x+c))+1/(a^2+b^2)*(-1/2*b*ln(1+ tan(d*x+c)^2)+a*arctan(tan(d*x+c)))+1/b^3*a^4/(a^2+b^2)*ln(a+b*tan(d*x+c)) )
Time = 0.27 (sec) , antiderivative size = 144, normalized size of antiderivative = 1.41 \[ \int \frac {\tan ^4(c+d x) (a B+b B \tan (c+d x))}{(a+b \tan (c+d x))^2} \, dx=\frac {2 \, B a b^{3} d x + B a^{4} \log \left (\frac {b^{2} \tan \left (d x + c\right )^{2} + 2 \, a b \tan \left (d x + c\right ) + a^{2}}{\tan \left (d x + c\right )^{2} + 1}\right ) + {\left (B a^{2} b^{2} + B b^{4}\right )} \tan \left (d x + c\right )^{2} - {\left (B a^{4} - B b^{4}\right )} \log \left (\frac {1}{\tan \left (d x + c\right )^{2} + 1}\right ) - 2 \, {\left (B a^{3} b + B a b^{3}\right )} \tan \left (d x + c\right )}{2 \, {\left (a^{2} b^{3} + b^{5}\right )} d} \]
1/2*(2*B*a*b^3*d*x + B*a^4*log((b^2*tan(d*x + c)^2 + 2*a*b*tan(d*x + c) + a^2)/(tan(d*x + c)^2 + 1)) + (B*a^2*b^2 + B*b^4)*tan(d*x + c)^2 - (B*a^4 - B*b^4)*log(1/(tan(d*x + c)^2 + 1)) - 2*(B*a^3*b + B*a*b^3)*tan(d*x + c))/ ((a^2*b^3 + b^5)*d)
Result contains complex when optimal does not.
Time = 1.47 (sec) , antiderivative size = 782, normalized size of antiderivative = 7.67 \[ \int \frac {\tan ^4(c+d x) (a B+b B \tan (c+d x))}{(a+b \tan (c+d x))^2} \, dx=\begin {cases} \tilde {\infty } B x \tan ^{3}{\left (c \right )} & \text {for}\: a = 0 \wedge b = 0 \wedge d = 0 \\\frac {B \left (x + \frac {\tan ^{3}{\left (c + d x \right )}}{3 d} - \frac {\tan {\left (c + d x \right )}}{d}\right )}{a} & \text {for}\: b = 0 \\- \frac {3 i B d x \tan {\left (c + d x \right )}}{2 b d \tan {\left (c + d x \right )} - 2 i b d} - \frac {3 B d x}{2 b d \tan {\left (c + d x \right )} - 2 i b d} - \frac {2 B \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )} \tan {\left (c + d x \right )}}{2 b d \tan {\left (c + d x \right )} - 2 i b d} + \frac {2 i B \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 b d \tan {\left (c + d x \right )} - 2 i b d} + \frac {B \tan ^{3}{\left (c + d x \right )}}{2 b d \tan {\left (c + d x \right )} - 2 i b d} + \frac {i B \tan ^{2}{\left (c + d x \right )}}{2 b d \tan {\left (c + d x \right )} - 2 i b d} - \frac {B \tan {\left (c + d x \right )}}{2 b d \tan {\left (c + d x \right )} - 2 i b d} + \frac {4 i B}{2 b d \tan {\left (c + d x \right )} - 2 i b d} & \text {for}\: a = - i b \\\frac {3 i B d x \tan {\left (c + d x \right )}}{2 b d \tan {\left (c + d x \right )} + 2 i b d} - \frac {3 B d x}{2 b d \tan {\left (c + d x \right )} + 2 i b d} - \frac {2 B \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )} \tan {\left (c + d x \right )}}{2 b d \tan {\left (c + d x \right )} + 2 i b d} - \frac {2 i B \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 b d \tan {\left (c + d x \right )} + 2 i b d} + \frac {B \tan ^{3}{\left (c + d x \right )}}{2 b d \tan {\left (c + d x \right )} + 2 i b d} - \frac {i B \tan ^{2}{\left (c + d x \right )}}{2 b d \tan {\left (c + d x \right )} + 2 i b d} - \frac {B \tan {\left (c + d x \right )}}{2 b d \tan {\left (c + d x \right )} + 2 i b d} - \frac {4 i B}{2 b d \tan {\left (c + d x \right )} + 2 i b d} & \text {for}\: a = i b \\\frac {x \left (B a + B b \tan {\left (c \right )}\right ) \tan ^{4}{\left (c \right )}}{\left (a + b \tan {\left (c \right )}\right )^{2}} & \text {for}\: d = 0 \\\frac {2 B a^{4} \log {\left (\frac {a}{b} + \tan {\left (c + d x \right )} \right )}}{2 a^{2} b^{3} d + 2 b^{5} d} - \frac {2 B a^{3} b \tan {\left (c + d x \right )}}{2 a^{2} b^{3} d + 2 b^{5} d} + \frac {B a^{2} b^{2} \tan ^{2}{\left (c + d x \right )}}{2 a^{2} b^{3} d + 2 b^{5} d} + \frac {2 B a b^{3} d x}{2 a^{2} b^{3} d + 2 b^{5} d} - \frac {2 B a b^{3} \tan {\left (c + d x \right )}}{2 a^{2} b^{3} d + 2 b^{5} d} - \frac {B b^{4} \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 a^{2} b^{3} d + 2 b^{5} d} + \frac {B b^{4} \tan ^{2}{\left (c + d x \right )}}{2 a^{2} b^{3} d + 2 b^{5} d} & \text {otherwise} \end {cases} \]
Piecewise((zoo*B*x*tan(c)**3, Eq(a, 0) & Eq(b, 0) & Eq(d, 0)), (B*(x + tan (c + d*x)**3/(3*d) - tan(c + d*x)/d)/a, Eq(b, 0)), (-3*I*B*d*x*tan(c + d*x )/(2*b*d*tan(c + d*x) - 2*I*b*d) - 3*B*d*x/(2*b*d*tan(c + d*x) - 2*I*b*d) - 2*B*log(tan(c + d*x)**2 + 1)*tan(c + d*x)/(2*b*d*tan(c + d*x) - 2*I*b*d) + 2*I*B*log(tan(c + d*x)**2 + 1)/(2*b*d*tan(c + d*x) - 2*I*b*d) + B*tan(c + d*x)**3/(2*b*d*tan(c + d*x) - 2*I*b*d) + I*B*tan(c + d*x)**2/(2*b*d*tan (c + d*x) - 2*I*b*d) - B*tan(c + d*x)/(2*b*d*tan(c + d*x) - 2*I*b*d) + 4*I *B/(2*b*d*tan(c + d*x) - 2*I*b*d), Eq(a, -I*b)), (3*I*B*d*x*tan(c + d*x)/( 2*b*d*tan(c + d*x) + 2*I*b*d) - 3*B*d*x/(2*b*d*tan(c + d*x) + 2*I*b*d) - 2 *B*log(tan(c + d*x)**2 + 1)*tan(c + d*x)/(2*b*d*tan(c + d*x) + 2*I*b*d) - 2*I*B*log(tan(c + d*x)**2 + 1)/(2*b*d*tan(c + d*x) + 2*I*b*d) + B*tan(c + d*x)**3/(2*b*d*tan(c + d*x) + 2*I*b*d) - I*B*tan(c + d*x)**2/(2*b*d*tan(c + d*x) + 2*I*b*d) - B*tan(c + d*x)/(2*b*d*tan(c + d*x) + 2*I*b*d) - 4*I*B/ (2*b*d*tan(c + d*x) + 2*I*b*d), Eq(a, I*b)), (x*(B*a + B*b*tan(c))*tan(c)* *4/(a + b*tan(c))**2, Eq(d, 0)), (2*B*a**4*log(a/b + tan(c + d*x))/(2*a**2 *b**3*d + 2*b**5*d) - 2*B*a**3*b*tan(c + d*x)/(2*a**2*b**3*d + 2*b**5*d) + B*a**2*b**2*tan(c + d*x)**2/(2*a**2*b**3*d + 2*b**5*d) + 2*B*a*b**3*d*x/( 2*a**2*b**3*d + 2*b**5*d) - 2*B*a*b**3*tan(c + d*x)/(2*a**2*b**3*d + 2*b** 5*d) - B*b**4*log(tan(c + d*x)**2 + 1)/(2*a**2*b**3*d + 2*b**5*d) + B*b**4 *tan(c + d*x)**2/(2*a**2*b**3*d + 2*b**5*d), True))
Time = 0.28 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.02 \[ \int \frac {\tan ^4(c+d x) (a B+b B \tan (c+d x))}{(a+b \tan (c+d x))^2} \, dx=\frac {\frac {2 \, B a^{4} \log \left (b \tan \left (d x + c\right ) + a\right )}{a^{2} b^{3} + b^{5}} + \frac {2 \, {\left (d x + c\right )} B a}{a^{2} + b^{2}} - \frac {B b \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{a^{2} + b^{2}} + \frac {B b \tan \left (d x + c\right )^{2} - 2 \, B a \tan \left (d x + c\right )}{b^{2}}}{2 \, d} \]
1/2*(2*B*a^4*log(b*tan(d*x + c) + a)/(a^2*b^3 + b^5) + 2*(d*x + c)*B*a/(a^ 2 + b^2) - B*b*log(tan(d*x + c)^2 + 1)/(a^2 + b^2) + (B*b*tan(d*x + c)^2 - 2*B*a*tan(d*x + c))/b^2)/d
Time = 0.89 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.03 \[ \int \frac {\tan ^4(c+d x) (a B+b B \tan (c+d x))}{(a+b \tan (c+d x))^2} \, dx=\frac {\frac {2 \, B a^{4} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{a^{2} b^{3} + b^{5}} + \frac {2 \, {\left (d x + c\right )} B a}{a^{2} + b^{2}} - \frac {B b \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{a^{2} + b^{2}} + \frac {B b \tan \left (d x + c\right )^{2} - 2 \, B a \tan \left (d x + c\right )}{b^{2}}}{2 \, d} \]
1/2*(2*B*a^4*log(abs(b*tan(d*x + c) + a))/(a^2*b^3 + b^5) + 2*(d*x + c)*B* a/(a^2 + b^2) - B*b*log(tan(d*x + c)^2 + 1)/(a^2 + b^2) + (B*b*tan(d*x + c )^2 - 2*B*a*tan(d*x + c))/b^2)/d
Time = 8.16 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.12 \[ \int \frac {\tan ^4(c+d x) (a B+b B \tan (c+d x))}{(a+b \tan (c+d x))^2} \, dx=\frac {B\,{\mathrm {tan}\left (c+d\,x\right )}^2}{2\,b\,d}-\frac {B\,\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )}{2\,d\,\left (b+a\,1{}\mathrm {i}\right )}-\frac {B\,a\,\mathrm {tan}\left (c+d\,x\right )}{b^2\,d}+\frac {B\,a^4\,\ln \left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}{b^3\,d\,\left (a^2+b^2\right )}-\frac {B\,\ln \left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )\,1{}\mathrm {i}}{2\,d\,\left (a+b\,1{}\mathrm {i}\right )} \]